<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="keywords" content="">
    <meta name="description" content="">

	<title>登录</title>
	<link rel="stylesheet" type="text/css" href="./css/frozen-min.css">
	<link rel="stylesheet" type="text/css" href="./css/login.css">
	<style>
		.mheader{ height: 50px;  line-height: 50px; background-color: #383c48; overflow: hidden; }
		.mheader h2{
			color: #fff;
			font-size:18px;
			line-height: 50px;
			text-align: center;
			margin: 0 auto;
			text-overflow: ellipsis;
			overflow: hidden;
			white-space: nowrap;
		}
	</style>
</head>
<body>
<div class="mheader clearfix">
	<h2>登录</h2>
</div>
	<div class="vue-ui-body" id="app">

		<div class="login-box">
			<p class="logo-wrap">
				<img src="./icon/logo.png" alt="LOGO" class="logo">
			</p>
            <form action="#" class="pass-form">

				<p class="form-item clear">
					<!--<label for="user">账号</label> <input type="number" v-model="username" placeholder="请输入手机号">-->
					<label >账号</label> <input type="text" name="uname" placeholder="请输入账号">
				</p>
				<p class="form-item clear">
					<label >密码</label> <input type="password" name="pwd" placeholder="请输入密码">
					<span class="passworld-controller iconfont icon-biyan"  ></span>
				</p>
				<p style="margin: 1rem 0 0.2rem 0;">
					<button type="button"  class="form-btn tijiaos" >登录</button>
				</p>
				<!--<p class="forgetpassword">-->
					<!--<a href="./editpassword.html">修改密码</a>-->
				<!--</p>-->
            </form>
		</div>

	</div>
</body>
<script type="text/javascript" src="./js/rem.js"></script>
<script type="text/javascript" src="./resource/js/style.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script>


	$(function () {
		$('.tijiaos').on('click',function () {				//提交时执行下列代码
            var uname = $("input[name='uname']").val();
            var pwd = $("input[name='pwd']").val();

            ajaxs("api/app/login.do",
                'post',
                { "uname": uname,"pwd":pwd },
                function (data) {
                console.log(data)
                	setCookie("yanzheng",data.data);		//将需要存储信息存取至cookie
                    if ( data.code==0 ){
                        location.href="my.html";
                    };
                	window.tool.loginSuccess(JSON.stringify(data));		//java外包伪装app代码
                    window.tool.alert(data.msg);					//弹出提示信息
                }
            );
        });
    });

</script>
</html>
